﻿@model Cdf54.Ja.SignalR.Chat.Models.ChangeProfileViewModel
@{
    ViewBag.Title = "Change Profile"; 
}
<h2>@ViewBag.Title.</h2>
<p class="text-success">@ViewBag.StatusMessage</p>
@using (Html.BeginForm("ChangeProfile", "Manage", FormMethod.Post, new { @class = "form-horizontal", role = "form" }))
{
    @Html.AntiForgeryToken()
    <h4> Change Profile Form for user: <span class="text-danger">"@Model.UserName"</span> </h4>
    <hr />
    @Html.ValidationSummary("", new { @class = "text-danger" })
    
    <div class="form-group">

        @*[10028] ADD: UserName (ReadOnly) in Manage/ChangeProfile*@
        <div class="form-group">
            @Html.LabelFor(m => m.UserName, new { @class = "col-md-2 control-label" })
            <div class="col-md-10">
                @Html.TextBoxFor(m => m.UserName, new { @class = "form-control", @readonly = true })
            </div>
        </div>
        @*[10028]*@
        <div class="form-group">
            @Html.LabelFor(m => m.Pseudo, new { @class = "col-md-2 control-label" })
            <div class="col-md-10">
                @Html.TextBoxFor(m => m.Pseudo, new { @class = "form-control" })
            </div>
        </div>
        <div class="form-group">
            @Html.LabelFor(m => m.Email, new { @class = "col-md-2 control-label" })
            <div class="col-md-10">
                @Html.TextBoxFor(m => m.Email, new { @class = "form-control" })
            </div>
        </div>
    </div>
    <div class="form-group">
        <div class="col-md-offset-2 col-md-10">
            <input type="submit" value="Change profile" class="btn btn-default" />
        </div>
    </div>
}

<input type="button" value="Shoot!" onclick="webcam.capture();" />
<div id="Camera"></div>
@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
<script src="@Url.Content("~/Scripts/jquery.webcam.js")">
</script>
<script>
    $("#Camera").webcam({
        width: 320,
        height: 240,
        mode: "save",
        swffile: "@Url.Content("~/Scripts/jscam.swf")",
        onTick: function () { },
        onSave: function () {
        },
        onCapture: function () {
            webcam.save("@Url.Content("~/Manage/Capture")/");
        },
        debug: function () { },
        onLoad: function () { }
    });
</script>


}